#include "common.h"
#include "ui.h"
#include "thread.h"
#include "options.h"

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR pCmdLine, int nCmdShow)
{
#ifdef NDEBUG
    //FreeConsole();
#endif
    get_all();
    
    init_ui(hInstance, pCmdLine, nCmdShow);
    
    create_mutex();
    create_wclass();
    create_main_window();
    
    create_thread();

    MSG msg;
    while (GetMessage(&msg, NULL, 0, 0)) {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }

    return EXIT_SUCCESS;
}
